<?php

include_once("../../commonFunctions.php");
$store = new Store($_SESSION['storeAbbrev']);
$dealer = new Dealer($_SESSION['dealerCode']);

if ($_GET['ttid'] == 'selectOne') {
    return '';
}

$tt = new TT($_GET['ttid']);
$submittedBy = new Dealer($tt->submittedBy);
if ($dealer->isSuperMA || $dealer->dealerCode == $tt->assignedTo) {
    $nextStatus = tts_getNextStatus($tt->currentStatus);
    $_SESSION['changeTTID'] = $tt->id;
    $_SESSION['nextStatus'] = $nextStatus;
    echo "<form action='JavaScript/phpHandlers/showTickets_changeStatus_form.php' method='get' >";
    echo '<input type="submit" value="Update The Status To ' . $nextStatus . '"class="submit"/>';
    echo "</form>";
} else {
    return '';
}
?>
